package com.retail.lottery.colalottery.utils;

import org.springframework.util.DigestUtils;

/**
 * MD5工具类
 * @author
 *
 */
public class MD5Util {
	private static final String slat = "retail-lottery-cola";
	/**
	 * 生成md5
	 * @param str
	 * @return
	 */
	public static String getMD5(String str) {
		return getMD5WithoutSlat(str +"/"+slat);
	}

	public static String getMD5WithoutSlat(String str) {
		String md5 = DigestUtils.md5DigestAsHex(str.getBytes());
		return md5;
	}
}
